<template>
  <CommonCard title="今日订单" :value="orderToday">
    <template v-slot:bottom>
      <span>昨日订单量</span>
      <span class="emphasis">{{ orderLastDay }}</span>
    </template>
  </CommonCard>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "TodatOrders",
});
</script>

<script setup lang="ts">
import CommonCard from "./CommonCard.vue";
//引入store
import useDataStore from "@/stores/reportData";
//引入计算属性
import { computed } from "vue";
//得到store对象
const dataStore = useDataStore();

//得到所需要的数据
const orderToday = computed(() => dataStore.reportData.orderToday as number);
const orderLastDay = computed(
  () => dataStore.reportData.orderLastDay as number
);
const orderTrend = computed(() => dataStore.reportData.orderTrend || []);
const orderTrendAxis = computed(() => dataStore.reportData.orderToday || []);
</script>

<style scoped lang="scss">

</style>
